<div class="positionData">
  <div class="add">
    <d-button (btnClick)="addPosition()">增加</d-button>
  </div>
  <div class="mt-4">
    <d-data-table [dataSource]="basicDataSource" [scrollable]="true" [tableWidthConfig]="tableWidthConfig"
      [tableOverflowType]="'overlay'">
      <thead dTableHead>
        <tr dTableRow>
          <th dHeadCell>#</th>
          <th dHeadCell *ngFor="let colOption of dataTableOptions.columns">{{ colOption.header}}</th>
        </tr>
      </thead>
      <tbody dTableBody>
        <ng-template let-rowItem="rowItem" let-rowIndex="rowIndex">
          <tr dTableRow>
            <td dTableCell>{{ rowIndex + 1 }}</td>
            <td dTableCell [rowItem]="rowItem">
              <span dTooltip [content]="rowItem?.positionNum">{{rowItem?.positionNum}}</span>
            </td>
            <td dTableCell [rowItem]="rowItem">
              <span dTooltip [content]="rowItem?.positionName">{{rowItem?.positionName}}</span>
            </td>
            <td dTableCell [rowItem]="rowItem">
              <span dTooltip [content]="rowItem?.isEnabled | status"><d-tag [tag]=" rowItem?.isEnabled | status" [labelStyle]="rowItem?.isEnabled"></d-tag></span>
            </td>
          </tr>
        </ng-template>
      </tbody>
    </d-data-table>
  </div>
</div>
<d-toast [value]="msgs" [life]="2000" [styleClass]="'custom-class'" [style]="{ left: '50%',top:'10px' }"></d-toast>
